package jmu.cyxwcy.librarymanagement.mapper;

import com.github.yulichang.base.MPJBaseMapper;
import jmu.cyxwcy.librarymanagement.pojo.Book;
import jmu.cyxwcy.librarymanagement.pojo.Students;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 
 * @since 2024-06-25
 */
public interface StudentsMapper extends MPJBaseMapper<Students> {

    @Select("select * from library_management.students where username=#{username}")
    Students findByUserName(String username);

    @Update("update library_management.students set password=#{md5String} where student_id=#{studentId}")
    void resetPassword(Integer studentId, String md5String);
}
